<include file="Public:header" />
<div id="zoneHeader">
    <h2>前10名收入走势图</h2>
</div><!--/#zoneHeader-->
<div id="zoneBody">
    <div id="zoneBodyContent">
        <p>以下是近一个月内每天收入前10名的站长汇总走势图</p>
        <div id="flow"></div> <!--/#flow--> 
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->

<script type="text/javascript">
function flowShow($o, cate, dao) {
    $o.highcharts({
        chart: {
            type: 'spline'
        },
        
        title: {
            text: '收入走势图',
            x: -20 //center
        },
        xAxis: {
            categories: cate
        },
        yAxis: {
            title: {
                text: '收入(元)'
            },
            min : 0,
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: '元',
            crosshairs : true,   //显示指针线
            shared: true    //可同时显示多个项目对应的数据
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: dao
    });
}

$(function() {

var $flow = $('#flow'),
    cate = {$days|json_encode},
    dao = {$dao|json_encode},
    r = [];

$.each(dao, function(k, v) {
    var tmp = {name : k, data : []};

    $.each(v, function(k2, v2){
        tmp.data.push(v2);
    })

    r.push(tmp);
})

flowShow($flow, cate, r);
});
</script>

<script src="__PUBLIC__/Js/chart/highcharts.js"></script>
<include file="Public:footer" />
